const gulp = require('gulp');
const sftp = require('gulp-sftp');
const prod = require('./build/gulpfile.prod.js');
const dev = require('./build/gulpfile.dev.js');
const del = require('del');//删除文件

prod();
dev();

//删除文件夹
gulp.task('del',function (done) {
  del(['./dist']);
  done()
});

gulp.task('upload', function () {
  return gulp.src('./dist/**/*')
    .pipe(sftp({
      host: '192.167.1.101',
      port:22,
      user: 'root',
      pass: '123',
      remotePath:'/XXX'
    }));
});


//build任务
gulp.task('build', gulp.series('sprite','html','font', 'css', 'js', 'assets', 'images',gulp.parallel('cleanLess','cleanPng','cleanComp')));